package com.wzp.yyptproject.controller;


import com.wzp.yyptproject.entity.KeShi;
import com.wzp.yyptproject.entity.NeiKe;
import com.wzp.yyptproject.repository.KeShiRepository;
import com.wzp.yyptproject.service.KeShiService;
import com.wzp.yyptproject.service.NeiKeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@CrossOrigin
@RequestMapping("neike")
public class NeiKeController {
    @Autowired
    private NeiKeService neiKeService;
    @Autowired
    private KeShiRepository keShiRepository;
    @GetMapping("findallneike")
    public List<NeiKe> findAllKeShi(){
        List<NeiKe> list = neiKeService.findAll();
            return list;

    }


}



